<template>
  <div>
    <div>
      <el-input
        size="medium"
        class="selectInput"
        placeholder="输入关键字查询"
        v-model="highdata.selectKey"
        suffix-icon="el-icon-circle-plus-outline">
      </el-input>
      <el-button
        size="medium" icon="el-icon-circle-plus-outline" type="success">查询
      </el-button>
    </div>
    <div>
      <el-table
        :data="highdata"
        style="width: 100%"
        :default-sort = "{prop: 'createTime', order: 'descending'}"
      >
        <el-table-column
          prop="userId"
          label="用户ID"
          sortable
          width="100">
        </el-table-column>
        <el-table-column
          prop="hostName"
          label="姓名"
          width="120">
        </el-table-column>
        <el-table-column
          prop="phone"
          label="手机号"
          width="160">
        </el-table-column>
        <el-table-column
          prop="idNumber"
          label="身份证号"
          width="200">
        </el-table-column>
        <el-table-column
            prop="email"
            label="邮箱"
            width="180">
        </el-table-column>
        <el-table-column
          prop="address"
          label="地址"
          width="320"
          :show-overflow-tooltip="true"
          :formatter="formatter">
        </el-table-column>
        <el-table-column
          prop="createTime"
          label="创建时间"
          sortable>
        </el-table-column>
      </el-table>
    </div>
  </div>
</template>

<script>
  export default {
    name: 'HighManage',
    data() {
      return {
        highdata:{
          selectKey:'',
          storeHost:'',
          phone:'',
          idNumber:'',
          email:'',
          createTime:'',
          address:'',
          score:''
        },
      }
    },
    mounted () {
      this.initTable();
    },
    methods: {
      formatter(row, column) {
        return row.address;
      },
      initTable(){
        this.getRequest('/personal/data/comfirm/enable/').then(resp => {
          if (resp) {
            this.highdata = resp;
          }
        })
      }
    }
  }
</script>

<style scoped>
  .selectInput{
    width: 220px;
    margin: 10px 10px 10px 15px;
  }
</style>
